<template>
  <div class="containers" :style="{ backgroundImage: 'url(' + backStage.backgroundImage + ')' }">
    <!-- <div class="logo">
      <img
        alt="logo"
        src="//p3-armor.byteimg.com/tos-cn-i-49unhts6dw/dfdba5317c0c20ce20e64fac803d52bc.svg~tplv-49unhts6dw-image.image"
      />
      <div class="logo-text">Arco Design Pro</div>
    </div> -->
    <!-- <LoginBanner /> -->
    <div class="content">
      <div class="content-inner">
        <LoginForms />
      </div>
      <div class="footer">
        <Footer />
      </div>
    </div>
  </div>
</template>
<script lang="ts" setup>
  import Footer from '@/components/footer/loginFooter.vue'
  // import LoginBanner from './components/banner.vue';
  import bcg from '@/assets/bcg.png'
  import LoginForms from './loginForms.vue'
  import { systemAdmin } from '@/api/url'
  import { onMounted, ref } from 'vue'
  import { get } from '@/api/http'
  const backStage = ref({
    passWordError: 3, //密码输入错误次数锁定账号
    icp: '', //备案号
    publicSecurity: '', //公安备案号
    name: '', //系统名称
    backgroundCustom: false, //true开启自定义背景图片 false不开启
    backgroundImage: bcg, //背景图片地址
    logoImage: '', //logo地址
    pageStyle: 0,
  })
  //获取
  const systemAdminFn = () => {
    get({
      url: systemAdmin,
    }).then((res) => {
      if (res.data) {
        if (res.data.backgroundCustom == false) {
          res.data.backgroundImage = bcg
        }

        backStage.value = res.data
      } else {
        backStage.value.backgroundImage = bcg
      }
    })
  }
  onMounted(async () => {
    await systemAdminFn()
  })
</script>

<style lang="less" scoped>
  .aa {
    position: relative;
  }
  .vbc {
    width: 433px;
    text-align: center;
    font-size: 26px;
    color: #ffffff;
    font-weight: 700;
    z-index: 3;
  }
  .mnb {
    width: 533px;
    display: flex;
    height: 577px;
    justify-content: center;
    align-items: center;
    border-radius: 20px;
    padding: 27px 50px 50px 50px;
    flex-wrap: wrap;
    background: linear-gradient(180deg, #dff4fe, #fff);
    background-size: cover;
    box-shadow: 0 2px 12px 0 rgba(64, 161, 255, 0.1);
  }

  .mnb::after {
    position: absolute;
    top: 0px;
    width: 100%;
    height: 100%;
    content: '';
    background-image: url('@/assets/imgs.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    z-index: 1;
  }
  .content-inner {
    display: flex;
    // flex: 1;
    align-items: center;
    justify-content: center;
    width: 800px;
    .box {
      display: flex;
      // flex: 1;
      align-items: center;
      justify-content: center;
      width: 500px;
      height: 500px;
      text-align: center;
      border-radius: 30px 0 0 30px;
      background-image: linear-gradient(-30deg, #40a1ff, #b0d8ff);
      .text_name {
        width: 100%;
        color: #ffffff;
        font-size: 35px;
      }
      .bottom {
        width: 100%;
        color: #ffffff;
        font-size: 24px;
        margin-top: 20px;
      }
    }
  }
  .containers {
    width: 100% !important;
    display: flex;
    height: 100vh;
    background-size: 100% 100%;

    .content {
      position: relative;
      display: flex;
      flex: 1;
      align-items: center;
      justify-content: center;
      padding-bottom: 40px;
    }

    .footer {
      position: absolute;
      right: 0;
      bottom: 0;
      width: 100%;
    }
  }

  .logo {
    position: fixed;
    top: 24px;
    left: 22px;
    z-index: 1;
    display: inline-flex;
    align-items: center;

    &-text {
      margin-right: 4px;
      margin-left: 4px;
      color: var(--color-fill-1);
      font-size: 20px;
    }
  }
</style>
